Align getLoadState/loadCollection/loadPartitions with PyMilvus#1885
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR updates the Java v2 SDK’s collection/partition load APIs to better align with PyMilvus behavior by applying RPC deadlines during load operations, using loading-progress polling for synchronous waits, and simplifying the load-state response surface.
Changes:
- Add per-RPC deadlines (based on request timeout) for
loadCollection/refreshLoad/loadPartitionsand associated progress checks. - Update synchronous waiting logic to poll
getLoadingProgressand optionally userefreshProgresswhen “refresh load” semantics are requested. - Remove
refreshProgressfromGetLoadStateRespand adjust the Docker test accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk-core/src/test/java/io/milvus/v2/client/MilvusClientV2DockerTest.java | Updates assertions to match the simplified GetLoadStateResp shape. |
| sdk-core/src/main/java/io/milvus/v2/service/partition/PartitionService.java | Adds deadline support to load/refresh progress RPCs and updates partition load wait loop. |
| sdk-core/src/main/java/io/milvus/v2/service/collection/response/GetLoadStateResp.java | Removes refreshProgress field and builder API from the response type. |
| sdk-core/src/main/java/io/milvus/v2/service/collection/CollectionService.java | Adds deadline support, refactors wait logic to use loading progress, and simplifies load-state progress reporting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: yhmo <yihua.mo@zilliz.com>
No description provided.